import request from '@/utils/request'

/**
 * 增加搜索记录
 * @param data
 * @returns
 */
export function addHistory(data: any) {
  return request({
    url: '/search/addHistory',
    method: 'post',
    data
  })
}

/**
 * 获取热门搜索
 * @returns
 */
export function getHotSearch() {
  return request({
    url: `/search/getHotSearch`,
    method: 'get'
  })
}

/**
 * 根据搜索关键字搜索歌曲
 */
export function getSongSerch(data: any) {
  return request({
    url: '/search/getSongSerch',
    method: 'post',
    data
  })
}

/**
 * 根据搜索关键字搜索专辑
 */
export function getAlbumSerch(data: any) {
  return request({
    url: '/search/getAlbumSerch',
    method: 'post',
    data
  })
}
